package com.dd;

import java.io.InputStream;
import java.util.Properties;

class InitPropLoader
{

    InitPropLoader()
    {
    }

    public String getVodHome()
    {
        String vodHome;
        Properties initProps;
        InputStream in;
        vodHome = null;
        initProps = new Properties();
        in = null;

        try
        {
            in = getClass().getResourceAsStream("/vod_init.properties");
            initProps.load(in);
        }catch(Exception e)
                {
            e.printStackTrace();
                }
        finally
        {
            try
            {
                if(in != null)
                    in.close();
            }
            catch(Exception e) { }
        }


        if(initProps != null)
        {
            vodHome = initProps.getProperty("vodHome");
            if(vodHome != null)
                for(vodHome = vodHome.trim(); vodHome.endsWith("/") || vodHome.endsWith("\\"); vodHome = vodHome.substring(0, vodHome.length() - 1));
        }
        return vodHome;
    }
}
